package com.ccq.controller;

import com.ccq.service.KnowledgeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = { "front" })
public class KnowledgeController {
    @Autowired
    KnowledgeService knowledgeService;

    @ApiOperation(value="知识库",notes = "知识库")
    @RequestMapping(value = { "knowledge" },method = RequestMethod.POST)
    @ResponseBody
    public String knowledge(String type){
        System.out.println(type) ;
        String ls=knowledgeService.knowlist(type);
        return ls;
    }

    @ApiOperation(value="全部",notes = "全部")
    @RequestMapping(value = { "knowledgelist" },method = RequestMethod.POST)
    @ResponseBody
    public String knowledgelist(){
        String ls=knowledgeService.knowlist1();
        return ls;
    }
}
